﻿using Castle.MonoRail.Framework;
using Yama.HelloWorld.Rails.Controllers;

namespace Yama.HelloWorld.Rails.Filters
{
    public class AccessDatabaseInFilter : Filter
    {
        protected override bool OnBeforeAction(IEngineContext context, IController controller, IControllerContext controllerContext)
        {
            ((HomeController) controller).VisitDao.CountVisitsForUrl("");

            return true;
        }
    }
}